package com.ji.TestZookeeper.curator.sharedlock;

import java.util.ArrayList;
import java.util.List;

public class CacheBase {
	private static List<String> cache = new ArrayList<>();

	public static void rmCache(String name) {
		if (cache.size() != 0) {
			cache.remove(0);
			System.out.println(name + "#删除一个，size:" + cache.size());
		}

	}

	public static void readCache(String name) {
		System.out.println(name + "#读取一个，size:" + cache.size());
	}

	public static void setCache(String str) {
		cache.add(str);
		System.out.println(str + "！生产" + cache.size());
	}

}
